import requests
url = "https://movie.douban.com/j/chart/top_list"
#重新封装参数
param = {
    "type": "11",
    "interval_id": "100:90",
    "action": "",
    "start": 0,
    "limit": 20,
}
headers = {
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36"
}
resp = requests.get(url=url, params=param, headers=headers)
print(resp.request.url)
print(resp.json())
resp.close() #关掉resp，防止出现服务器访问过多